In recent years, a plurality of ECUs (electronic control units) are installed in vehicles. The ECUs are supplied with electric power from an electric power storage device to control operation of vehicle-mounted devices (such as an engine, a light source device, or an air-conditioning device).
The ECUs each include a storage unit in which a computer program (hereinafter, referred to as “program”) is stored.
Conventionally, a program updating method has been proposed in which a program (i.e., old program) that is stored in a first storage unit of a first ECU is, before being updated, copied to a second storage unit of a second ECU (see JP 2014-029619A).
In the program updating method according to JP 2014-029619A, after copying the old program to the second storage unit, the first ECU receives a new program from a vehicle exterior device, and writes the received new program into the first storage unit. If the writing of the new program is unsuccessful, the first ECU writes back the old program stored in the second storage unit to the first storage unit.
Furthermore, the ECUs each include an accumulation unit in which failure information is accumulated.
Conventionally, a vehicle-mounted relay device has been proposed that requests an ECU to transmit failure information, and transmits the failure information that is read from the accumulation unit by the EUC to a vehicle exterior device (see JP 2014-113860A).
If a program is updated when the remaining amount of stored power in the electric power storage device is insufficient, writing of a new program may fail due to electric power shortage during the writing.
If failure information is requested when the remaining amount of stored power in the electric power storage device is insufficient, reading of the failure information may fail due to electric power shortage during the reading.
Such failures waste electric power, and should thus be avoided.
The present invention was made in view of the above-described circumstances, and it is a main object thereof to provide a vehicle-mounted relay device that can suppress failures in reading/writing of data due to electric power shortage.